import { locations } from "../../../../gpu/locations";
export const NormalMap_rel = /*wgsl*/ `
    #if ~{def.normalMap}
      var normalUv:vec2<f32>= cal_uv(input);
      var TBN:mat3x3<f32> = cal_TBN(input, normal, normalUv);
      normal = textureSample(normalMap,normalMap_sampler, normalUv).rgb * 2.0 - vec3(1.0);
      normal = TBN * normalize(normal);
    #endif 
  `